package util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcUtil {
    public static Connection getConnection() throws ClassNotFoundException, SQLException {
        String driverName,url,username,password;
        driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver";
        url="jdbc:sqlserver://localhost:1433;DatabaseName=SmallBookshopDB";
        username="sa";
        password="190801";
        Class.forName(driverName);
        return DriverManager.getConnection(url,username,password);
    }
}
